package atech.ace.mapping.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the humanresource database table.
 * 
 */
@Entity
@Table(name="humanresource")
public class HumanResource implements Serializable {
	private static final long serialVersionUID = 1L;
	private String humanResourceID;
	private String email;
	private String expertise;
	private String firstName;
	private String lastName;
	private String region;
	private List<Project> projects;

    public HumanResource() {
    }


	@Id
	@Column(name="HumanResourceID")
	public String getHumanResourceID() {
		return this.humanResourceID;
	}

	public void setHumanResourceID(String humanResourceID) {
		this.humanResourceID = humanResourceID;
	}


	@Column(name="Email")
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	@Column(name="Expertise")
	public String getExpertise() {
		return this.expertise;
	}

	public void setExpertise(String expertise) {
		this.expertise = expertise;
	}


	@Column(name="FirstName")
	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}


	@Column(name="LastName")
	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}


	@Column(name="Region")
	public String getRegion() {
		return this.region;
	}

	public void setRegion(String region) {
		this.region = region;
	}


	//bi-directional many-to-many association to Project
    @ManyToMany
	@JoinTable(
		name="project_resource"
		, joinColumns={
			@JoinColumn(name="HumanResourceID")
			}
		, inverseJoinColumns={
			@JoinColumn(name="ProjectID")
			}
		)
	public List<Project> getProjects() {
		return this.projects;
	}

	public void setProjects(List<Project> projects) {
		this.projects = projects;
	}
	
}